on error resume next Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set WshShell = WScript.CreateObject("WScript.Shell") Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") Err.Clear checkOSArch = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") returnValue = 0 if Err Then Err.Clear else strKeyPath64 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" returnValue = RemoveVLC(strKeyPath64) strKeyPath86 = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" returnValue = RemoveVLC(strKeyPath86) End If Function RemoveVLC(KeyPath) On error resume next Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") set shell = CreateObject("WScript.Shell") objReg.EnumKey HKEY_LOCAL_MACHINE, KeyPath, arrSubKeys For Each Subkey in arrSubKeys str1 = "HKEY_LOCAL_MACHINE\"&KeyPath &"\"&Subkey &"\DisplayName" str2 = WshShell.RegRead(str1) if InStr (str2,"Zoom") <> 0 then str3 = "HKEY_LOCAL_MACHINE\"&KeyPath &"\"&Subkey &"\UninstallString" uninstallStr = WshShell.RegRead(str3) uninstallStr=Replace(uninstallStr,"/I","/x") returnValue =WshShell.Run(uninstallStr & " /qn /norestart",0,TRUE) end if Next End Function